using System;

namespace Sedna.Core.Common.Objects.Navigation
{
	internal class RootNode: NavigationNode
	{
		private object rootObject;

		public RootNode(object rootObject): base(null, null, null)
		{
			this.rootObject=rootObject;
		}

		protected override object GetValueRecursive(bool autoCreate)
		{
			return rootObject;
		}

		protected override void SetValue(object newValue)
		{
			throw new NotSupportedException("Can't set the value of the root node.");
		}
	}
}
